import request from '@/utils/request'

export function searchAll(pageNo, pageSize) {
  return request({
    url: '/perf/report/searchAll',
    method: 'get',
    params: { pageNo, pageSize }
  })
}

export function deleteReport(reportId) {
  return request({
    url: '/perf/report/delete',
    method: 'get',
    params: { reportId }
  })
}

export function getDetail(id, count, interval) {
  return request({
    url: '/perf/report/getDetail',
    method: 'get',
    params: { id, count, interval }
  })
}

export function reExecution(reportId, users, qps, remark) {
  return request({
    url: '/perf/report/reExecution',
    method: 'get',
    params: { reportId, users, qps, remark }
  })
}

export function finish(id) {
  return request({
    url: '/perf/report/finish',
    method: 'get',
    params: { id }
  })
}

export function stop(id) {
  return request({
    url: '/perf/report/stop',
    method: 'get',
    params: { id }
  })
}

export function countByStatus() {
  return request({
    url: '/perf/report/countByStatus',
    method: 'get'
  })
}
